import Cookies from 'js-cookie'

const TokenKey = 'hrsass_token'
const LoginTimeKey = 'hrsass_login_time'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  Cookies.set(LoginTimeKey, Date.now())
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

//取出登录时间戳
export function getTimeStamp() {
  return Cookies.get(LoginTimeKey)
}